"use strict"

/**
 * 西藏自治区政府采购网爬虫
 *  
 */

var Base = require("./base");
var xz_spider = new Base();
xz_spider.name = "西藏自治区采购网";
xz_spider.page = 1;

xz_spider.getPageUrl = function (pg) {
  return "http://www.ccgp-xizang.gov.cn/shopHome/morePolicyNews.action?categoryId=124,125&areaParam=xizhang";
};

xz_spider.getItems = function ($) {
  var items = [];
  $("#news_div a").each(function (index, ele) {
    var e = $(ele);
    var item = {};
    item.title = e.text();
    item.url = "http://www.ccgp-xizang.gov.cn" + e.attr("href");
    item.source = xz_spider.name;
    items.push(item);
  });
  return items;
};

exports = module.exports = xz_spider;